package com.ruoyi.web.controller.tzzl;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tzzl.domain.WzFocuson;
import com.ruoyi.tzzl.domain.bo.WzFocusonBo;
import com.ruoyi.tzzl.domain.vo.QueryVo;
import com.ruoyi.tzzl.service.IWzFocusonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

/**
 * 用户关注Controller
 * @author by caoyong
 * @date 2022/11/18
 **/
@RestController
@RequestMapping("/tzzl/focuson")
public class WzFocusonController extends BaseController {

    @Autowired
    private IWzFocusonService wzFocusonService;

    /**
     * 关注
     * */
    @PostMapping("/add")
    public AjaxResult add(@RequestBody WzFocuson wzFocuson){
        return AjaxResult.success( wzFocusonService.follow(wzFocuson));
    }

    /**
     * 取关
     * */
    @PostMapping("/attention")
    public AjaxResult attention(@RequestBody WzFocuson wzFocuson){
        return AjaxResult.success(wzFocusonService.attention(wzFocuson));
    }

   /**
    * 查看用户关注列表
    * */
   @GetMapping("/attentionList")
    public AjaxResult attentionList(QueryVo queryVo){
       return AjaxResult.success(wzFocusonService.attentionList(queryVo));
   }




}
